<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../code/vue.js"></script>
</head> 
<body>
    <div id="app">
        <div>
            数量
            <input type="text" v-model="num" >
        </div>
        <div>
            单价
            <input type="text" v-model="price">
        </div>
        <div>
            总价: {{ num*price }}
        </div>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                price:1,
                num:1
            }
        })
    </script>
</body>
</html>